package com.dai.spec.common.enums;

/**
 * 课程类型枚举
 */
@SuppressWarnings("all")
public enum CourseType {
    SHEHUIKEXUE("0", "社会科学类"),
    ZIRANKRXUE("1", "自然科学类"),
    WENXUEYISHU("2", "文学艺术类"),
    CHUANGXINCHUANGYE("3", "创新创业类");

    private String code;
    private String value;

    CourseType(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public  static String getValueByCode(String code){
        for (CourseType courseTypeEnum : CourseType.values()) {
            if (courseTypeEnum.getCode().equals(code)){
                return courseTypeEnum.getValue();
            }
        }
        return null;
    }
}
